import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import About from '@/components/About'
import Article from '@/components/Article'
import News from '@/components/News'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'index',
      redirect: '/home'
    },{
      path: '/home',
      name: 'Home',
      component: Home,
      children:[
        {
          path: '/article',
          name: 'Article',
          component: Article
        },{
          path: '/news',
          name: 'News',
          component: News
        }
      ]
    },{
      path: '/about',
      name: 'About',
      component: About
    }
  ]
})
